/**
 iTextUploader
 (C) 2008 MyselftDev (myselftdev@gmail.com)
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; version 2
 of the License.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

/* Revision: $Id: PreferencesTableController.h 118 2009-04-27 19:22:56Z myselftdev $ */

#import <UIKit/UIKit.h>

#import "Definitions.h"

#import "PreferencesData.h"
#import	"TextAlertView.h"

#define kLevelMain		1
#define kLevelAdvanced	2
#define kLevelIntervals	3

typedef struct {
	NSUInteger intervalNumber;
	NSString *nameShort;
	NSString *nameLong;
} intervalValues;

@interface PreferencesTableController : NSObject <UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate, UIAlertViewDelegate> {
	PreferencesData		*data;
	id					parent;
	
	UITableViewCell		*usernameCell;
	UITextField			*usernameField;
	UITableViewCell		*passwordCell;
	UITextField			*passwordField;
	UITableViewCell		*advancedCell;
	UITableViewCell		*donateCell;
	UITextView			*donateText;
	UIButton			*donateButton;
	
	UITableViewCell		*privacyCell;
	UISwitch			*privacySwitch;
	UITableViewCell		*automaticUploadCell;
	UISwitch			*automaticUploadSwitch;
	UITableViewCell		*automaticUploadNetworkCell;
	UISwitch			*automaticUploadNetworkSwitch;
	UITableViewCell		*automaticUploadIntervalCell;
	UILabel				*automaticUploadIntervalLabel;
	
	unsigned char		level;
}

- (id)initWithData:(PreferencesData*)dataObject parent:(id)parentObject;

- (intervalValues)valuesForIntervalId: (NSInteger)theId;
- (void)privacySwitchChanged;
- (void)automaticUploadSwitchChanged;
- (void)automaticUploadNetworkSwitchChanged;

@property unsigned char level;

@end

